<div class="crumb-wrap">
    <div class="crumb-list"><i class="icon-font"></i><a href="<?=site_url()?>">首页</a><span class="crumb-step">&gt;</span><a class="crumb-name" href="<?=site_url('level/index')?>">等级管理（电子商铺）</a><span class="crumb-step">&gt;</span><span>修改等级</span></div>
</div>
<div class="result-wrap">
    <div class="result-content">
        <form action="<?=site_url('level/operation')?>" method="post" id="myform" name="myform" enctype="multipart/form-data">
            <table class="insert-tab" width="100%">
                <tbody>
                    <tr>
                        <th width="150"><i class="require-red">*</i>等级名称：</th>
                        <td>
                            <input class="common-text required" id="title" name="name" size="50" value="<?=$res['name']?>" type="text">
                        </td>
                    </tr>
                    <tr>
                        <th><i class="require-red">*</i>对应ID：</th>
                        <td>
                            <input class="common-text required" id="title" name="group_id" size="50" value="<?=$res['group_id']?>" type="text">
                            <span>会员系统权限管理对应编号，请务必核实，没有则为0</span>
                        </td>
                    </tr>
                    <tr>
                        <th><i class="require-red">*</i>预付金额：</th>
                        <td>
                            <input class="common-text required" id="title" name="prepaid" size="50" value="<?=$res['prepaid']?>" type="text">
                        </td>
                    </tr>
                    <tr>
                        <th><i class="require-red">*</i>配送店铺：</th>
                        <td>
                            <input class="common-text required" id="title" name="num" size="50" value="<?=$res['num']?>" type="text">
                        </td>
                    </tr>
                    <tr>
                        <th><i class="require-red">*</i>店铺成本：</th>
                        <td>
                            <input class="common-text required" id="title" name="cost" size="50" value="<?=$res['cost']?>" type="text">
                        </td>
                    </tr>
                    <tr>
                        <th><i class="require-red">*</i>单笔提成（%）：</th>
                        <td>
                            <input class="common-text required" id="title" name="commission" size="50" value="<?=$res['commission']*100?>" type="text">
                        </td>
                    </tr>
                    <tr>
                        <th><i class="require-red">*</i>最大利润比（%）：</th>
                        <td>
                            <input class="common-text required" id="title" name="max" size="50" value="<?=$res['max'] * 100 ?>" type="text">
                            <span> 运算时，根据如金额没有超过最大利润比，则使用运算金额，但超过时，使用最大利润</span>
                        </td>
                    </tr>
                    <tr>
                        <th><i class="require-red">*</i>最小利润比（%）：</th>
                        <td>
                            <input class="common-text required" id="title" name="min" size="50" value="<?=$res['min'] * 100 ?>" type="text">
                        </td>
                    </tr>
                    <tr>
                        <th><i class="require-red">*</i>分销资格：</th>
                        <td>
                            <select name="power" id="catid" class="required">
                                <option value="1" <?=$res['power'] == 1 ? 'selected' : ''?>>是</option>
                                <option value="2" <?=$res['power'] == 2 ? 'selected' : ''?>>否</option>
                                <option value="3" <?=$res['power'] == 3 ? 'selected' : ''?>>其他</option>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <th>备注：</th>
                        <td>
                            <textarea name="note" class="common-textarea" id="content" cols="30" style="width: 60%;" rows="5"><?=$res['note']?></textarea>
                            <br />
                            <span><i class="require-red">*</i>最多只能为225个字符</span>
                        </td>
                    </tr>
                    
                    <tr>
                        <th></th>
                        <td>
                            <input type="hidden" name="oid" value="<?=$res['id']?>">
                            <input name="hierarchy" value="<?=$res['hierarchy']?>" type="hidden">

                            <input class="btn btn-primary btn6 mr10" value="提交" type="submit">
                            <input class="btn btn6" onclick="history.go(-1)" value="返回" type="button">
                        </td>
                    </tr>
                </tbody></table>
        </form>
    </div>
</div>
<script type="text/javascript">
    $('#myform').submit(function() {
        $(this).ajaxSubmit(function(data){
            if(data == 1){
                layer.alert('修改成功！',{
                    icon:1,
                });
            }else{
                layer.alert(data,{
                    icon:2,
                });
            }
        })
        return false;
    })
</script>